<form class="layui-form layui-box" style='padding:25px 30px 20px 0' action="__SELF__" data-auto="true" method="post">
    <div class="layui-form-item">
        <label class="layui-form-label">描述</label>
        <div class="layui-input-block">
            {if $info and isset($info.detail)}
            <input name="detail" value='{$info.detail|default=""}'
                   required="required" title="请输入描述" placeholder="请输入描述" class="layui-input ">
            {else /}
            <input name="detail" value='{$info.detail|default=""}' required="required"
                   title="请输入描述" class="layui-input">
            {/if}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">充值金额</label>
        <div class="layui-input-block">
            {if $info and isset($info.amount)}
            <input name="amount" value='{$info.amount|default=""}'
                   required="required" title="充值金额必须是整数" placeholder="请输入充值金额1~100000之间的整数" pattern="^([1-9]\d{0,5}|100000)$" class="layui-input ">
            {else /}
            <input name="amount" value='{$info.amount|default=""}' required="required"
                   title="充值金额必须是整数" pattern="^([1-9]\d{0,5}|100000)$" class="layui-input">
            {/if}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">赠送金额</label>
        <div class="layui-input-block">
            {if $info and isset($info.give_away)}
            <input name="give_away" value='{$info.give_away|default=""}'
                   required="required" title="请输入赠送金额" placeholder="请输入赠送金额" pattern="^([1-9]\d{0,5}|100000)$" class="layui-input ">
            {else /}
            <input name="give_away" value='{$info.give_away|default=""}' required="required"
                   title="请输入赠送金额" pattern="^([1-9]\d{0,5}|100000)$" class="layui-input">
            {/if}
        </div>
    </div>
    <div class="hr-line-dashed"></div>
    <div class="layui-form-item text-center">
        {if isset($info['id'])}<input type='hidden' value='{$info.id}' name='id'/>{/if}
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>
    <script>window.form.render();</script>
</form>
